﻿@model blacksoft.Models.Reset
@using blacksoft.Helpers

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_LayoutSeguridad.cshtml";
}

@if (null != TempData["alertContraseñaIncorrecta"])
{
    <script type="text/javascript">
        alert("@TempData["alertContraseñaIncorrecta"]");
    </script>
}
@if (null != TempData["NoTieneUnUsuarioAun"])
{
    <script type="text/javascript">
        alert("@TempData["NoTieneUnUsuarioAun"]");
        window.location.href = '@Url.Action("Index", "GenerarUsuario")';
    </script>
}


<div class="block big">
    <div class="titlebar">
        <h3>Resetear Contraseña</h3>
    </div>
    <div class="block_cont">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()
            @Html.HiddenFor(model => model.IdPersona)
            <div class="form">
                @Html.ValidationSummary(true)
                <div class="form-row">
                    @Html.LabelForRequired(model => model.Nombre)
                    @Html.TextBoxFor(model => model.Nombre, new { @class = "text-box single-line", @readonly = "readonly" })
                    @Html.ValidationMessageFor(model => model.Nombre)
                </div>
                <div class="form-row">
                    @Html.LabelForRequired(model => model.ApellidoPaterno)
                    @Html.TextBoxFor(model => model.ApellidoPaterno, new { @class = "text-box single-line", @readonly = "readonly" })
                    @Html.ValidationMessageFor(model => model.ApellidoPaterno)
                </div>
                <div class="form-row">
                    @Html.LabelForRequired(model => model.ApellidoMaterno)
                    @Html.TextBoxFor(model => model.ApellidoMaterno, new { @class = "text-box single-line", @readonly = "readonly" })
                    @Html.ValidationMessageFor(model => model.ApellidoMaterno)
                </div>
                <div class="form-row">
                    @Html.LabelForRequired(model => model.CargoPersonal)
                    @Html.TextBoxFor(model => model.CargoPersonal, new { @class = "text-box single-line", @readonly = "readonly" })
                    @Html.ValidationMessageFor(model => model.CargoPersonal)
                </div>
                <div class="form-row">
                    @Html.LabelForRequired(model => model.ContraseñaNueva)
                    @Html.EditorFor(model => model.ContraseñaNueva)
                    @Html.ValidationMessageFor(model => model.ContraseñaNueva)
                </div>
                <br />
                <div class="form-row">
                    <input type="submit" value="Crear contraseña" class="btn btn-default" />
                    <br />
                    @Html.ActionLink("Regresar al listado", "Index")
                </div>
            </div>
        }
    </div>
</div>






